import Vue from 'vue'
import VueRouter from 'vue-router'

const Login = () => import('../views/login/Login')
const Register = () => import('../views/login/register')
const Home = () => import('../views/home/home')
const VideoStudy = () => import('../views/video-study/videoStudy')
const Editor = () => import('../views/write/writeBlog/writeBlog')
const Forum = () => import('../views/write/write-forum/write-forum')
const UploadVideo = () => import('../views/write/upload-video/upload-video')
const QuestionBank = () => import('../views/questionBank/questionBank')
const questionSave = () => import('../views/questionSave/questionSave')
const Blog = () => import('../views/blog/blog')
const Recruit = () => import('../views/recruit/recruit')
const Forums = () => import('../views/forum/forum')
const VIP = () => import('../views/VIP/vip')
const Dynamic = () => import('../views/dynamic/dynamic')
const videoPlay = () => import('../views/video-study/video-play')
const Information = () => import('../views/information/information')
const lookBlog = () => import('../views/blog/lookBlog')
const question = () => import('../views/questionBank/question')
const notify = () => import('../views/notify/notify')
const taolun = () => import("../views/forum/taolun")
const search = () => import("../views/search/search")

Vue.use(VueRouter)

const routes = [
  {
    path: "",
    redirect: "/home"
  },
  {
    path:'/home',
    component:Home
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: "/register",
    component: Register
  },
  {
    path: '/video',
    component: VideoStudy
  },
  {
    path: '/editor',
    component: Editor
  },
  {
    path: '/forum',
    component: Forum
  },
  {
    path: '/uploadVideo',
    component: UploadVideo
  },
  {
    path: '/questionBank',
    component: QuestionBank
  },
  {
    path: '/questionSave',
    component: questionSave
  },
  {
    path: '/blog',
    component: Blog
  },
  {
    path: '/recruit',
    component: Recruit
  },
  {
    path: '/forums',
    component: Forums
  },
  {
    path: '/vip',
    component: VIP
  },
  {
    path: '/dynamic',
    component: Dynamic
  },
  {
    path: '/videoPlay',
    component: videoPlay
  },
  {
    path: '/information',
    component: Information,
  },
  {
    path: '/lookBlog',
    component: lookBlog
  },
  {
    path : "/question",
    component: question
  },
  {
    path : "/notify",
    component: notify
  },
  {
    path : "/taolun",
    component: taolun
  },
  {
    path : "/search",
    component: search
  }

]

const router = new VueRouter({
  routes,
  mode:"history"
})

export default router
